﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="PurchaseTicket.aspx.cs" Inherits="TicketingCompany.PurchaseTicket" %>

<asp:Content ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ContentPlaceHolderID="MainContent" runat="server">
    <asp:Literal ID="LiteralEventInfo" Text="" runat="server" />
    Tickets Number:
    <asp:TextBox ID="TextBoxTickets" runat="server" />
    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ErrorMessage="Atleast one Ticket needed." text="*" ForeColor=Red ControlToValidate="TextBoxTickets" 
        runat="server" />
    <asp:CompareValidator ID="valRequired" runat="server" ControlToValidate="TextBoxTickets"
        ValueToCompare="0" Type="Integer" Operator="GreaterThan" ErrorMessage="* Atleast one Ticket needed." ForeColor=Red
        Display="dynamic">*
    </asp:CompareValidator>
    <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToValidate="TextBoxTickets" ValueToCompare="1000"
        Type="Integer" Operator="LessThan" ErrorMessage="* You must enter tickets number less than 1000" ForeColor=Red 
        Display="dynamic">*
    </asp:CompareValidator>
    <br />
    Your Name:
    <asp:TextBox ID="TextBoxUserName" runat="server" />
    <asp:RequiredFieldValidator ErrorMessage="User Name Empty" text="*" ForeColor=Red ControlToValidate="TextBoxUserName" 
        runat="server" />       
    <br />
    Shipping Address:
    <asp:TextBox ID="TextBoxShippingAdress" runat="server" />
    <asp:RequiredFieldValidator ID="RequiredFieldValidatorShippingAdress" ErrorMessage="Shippig Addres is Empty" 
    text="*" ForeColor=Red ControlToValidate="TextBoxShippingAdress" runat="server" />
    <asp:CustomValidator ID="CustomValidatorShippingAdress" runat="server" ControlToValidate="TextBoxShippingAdress"
            ErrorMessage="The Shipping address should be between 1 and 150 characters" 
            OnServerValidate="CustomValidatorShippingAddress_ServerValidate" Text="*" ForeColor=Red />
    <br />

    <asp:ValidationSummary ForeColor="Red" runat="server" />
    <asp:Button ID="ButtonPurchase" Text="Purchase" runat="server" OnClick="ButtonPurchase_Click" /><br />
    <asp:Label Visible="false" ID="LabelIsAdded" Text="Sucessfuly added" runat="server"
        ForeColor="DarkGreen" />
</asp:Content>
